package com.guojiaming.shop.bean;

import com.google.gson.annotations.Expose;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @author vivo
 */
@Validated
public class UserModifyPass {
    @Expose
    @NotNull
    private Integer userId;
    @Expose
    @NotNull
    private String oldPass;
    @Expose
    @NotNull
    @Length(min = 6, max = 22)
    private String newPass;
    @Null
    @Expose(deserialize = false, serialize = false)
    private User user;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getOldPass() {
        return oldPass;
    }

    public void setOldPass(String oldPass) {
        this.oldPass = oldPass;
    }

    public String getNewPass() {
        return newPass;
    }

    public void setNewPass(String newPass) {
        this.newPass = newPass;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}